import axios from 'axios';

type TMethod = 'get' | 'post' | 'put' | 'delete';

export default ({ method, url, data }: { method: TMethod; url: string; data: Object }) => {
  return axios({ method: method || 'get', url: url, data: data });
};
